<el-dialog :close-on-click-modal="false"  :close-on-press-escape="false"  :title="title" class="dialogStyleBase maxHeight" width="1100px" :visible.sync="boxVisible" append-to-body
    :before-close="editBoxCancel">
    <LayoutEditFormBox :loading="load">
        <template slot="main">
            <LayoutCell>
                <LayoutCellItem title="详情信息" v-if="orderData">

                    <LayoutDetailGroup :gutter="20">
                        <LayoutDetailItem :span="8" label="订单编号" :value="orderData.orderNo || '-'"></LayoutDetailItem>


                        <LayoutDetailItem :span="8" label="支付渠道" :value="orderData.payChannel == 1 ? '线上':'线下'">
                        </LayoutDetailItem>

                        <LayoutDetailItem :span="8" label="订单类型" :value='orderData.orderType == 1 ? "普通订单" :
                            "充值订单"'>
                        </LayoutDetailItem>



                        <LayoutDetailItem :span="8" label="订单状态" :value="orderData.orderFlow.stateDesc">
                        </LayoutDetailItem>

                        <LayoutDetailItem :span="8" v-if="orderData.orderType == 1" label="发货方式："
                            :value="deliveryWay(orderData.deliveryType) ">
                        </LayoutDetailItem>

                    </LayoutDetailGroup>

                </LayoutCellItem>
                <LayoutCellItem title="客户信息">
                    <div class="header">
                        <div class="left">
                            <imageBox :src="orderData.icon" width="100px" height="100px"></imageBox>
                        </div>
                        <div class="right">
                            <div class="info">

                                <LayoutDetailGroup :gutter="20">
                                    <LayoutDetailItem :span="8" label="客户编号" :value="orderData.memberCode || '-'">
                                    </LayoutDetailItem>
                                    
                                    <LayoutDetailItem :span="8" label="客户手机号" :value="orderData.mobile || '-'">
                                    </LayoutDetailItem>

                                    <LayoutDetailItem :span="8" label="客户昵称" :value='orderData.nickName || "-" '>
                                    </LayoutDetailItem>
                                </LayoutDetailGroup>

                            </div>
                        </div>
                    </div>
                </LayoutCellItem>


                <LayoutCellItem title="订单取消原因" v-if="!$vFN.Utils.isEmpty(orderData.cancelReason)">
                    <LayoutDetailGroup :gutter="20">
                        <LayoutDetailItem :span="8" label="订单取消理由" :value="orderData.cancelReason.cancelReason || '无'">
                        </LayoutDetailItem>
                        <LayoutDetailItem :span="8" label="订单取消理由类型"
                            :value="orderData.cancelReason.cancelReasonType || '无'">
                        </LayoutDetailItem>
                        <LayoutDetailItem :span="8" label="订单取消描述" :value="orderData.cancelReason.cancelRemark || '无'">
                        </LayoutDetailItem>
                    </LayoutDetailGroup>

                </LayoutCellItem>
                <LayoutCellItem title="订单抵扣明细" v-if="!$vFN.Utils.isEmpty(orderData.deductDetailLst)">


                    <LayoutDetailGroup :gutter="20" v-for="(deductItem,deductIndex) of orderData.deductDetailLst"
                        :key="deductIndex">
                        <LayoutDetailItem :span="8" label="使用数量" :value="deductItem.useIntegral || 0">
                        </LayoutDetailItem>
                        <LayoutDetailItem :span="8" label="抵扣金额" :value="$vFN.Tools.toMoneyCount(deductItem.integralAmount || 0)">
                        </LayoutDetailItem>
                        <LayoutDetailItem :span="8" label="资产名称" :value="deductItem.integralTypeName || '无'">
                        </LayoutDetailItem>
                    </LayoutDetailGroup>

                </LayoutCellItem>
                <LayoutCellItem title="运费抵扣明细" v-if="!$vFN.Utils.isEmpty(orderData.freightDeductDetailLst)">


                    <LayoutDetailGroup :gutter="20"
                        v-for="(freightDeductItem,freightDeductIndex) of orderData.freightDeductDetailLst"
                        :key="freightDeductIndex">
                        <LayoutDetailItem :span="8" label="使用数量" :value="freightDeductItem.useIntegral || 0">
                        </LayoutDetailItem>
                        <LayoutDetailItem :span="8" label="抵扣金额" :value="$vFN.Tools.toMoneyCount(freightDeductItem.integralAmount || 0)">
                        </LayoutDetailItem>
                        <LayoutDetailItem :span="8" label="资产名称" :value="freightDeductItem.integralTypeName || '无'">
                        </LayoutDetailItem>
                    </LayoutDetailGroup>

                </LayoutCellItem>
                <LayoutCellItem title="运费信息"
                    v-if="!$vFN.Utils.isEmpty(orderData.orderFreight) && $vFN.Utils.isEmpty(orderData.cancelReason)">

                    <LayoutDetailGroup :gutter="20">
                        <LayoutDetailItem :span="8" label="应收运费"
                            :value="$vFN.Tools.toMoneyCount(orderData.orderFreight.collectAmount || 0)">
                        </LayoutDetailItem>
                        <LayoutDetailItem :span="8" label="运费优惠金额"
                            :value="$vFN.Tools.toMoneyCount(orderData.orderFreight.promotionAmount || 0)">
                        </LayoutDetailItem>
                        <LayoutDetailItem :span="8" label="实收运费" :value="$vFN.Tools.toMoneyCount(orderData.orderFreight.payAmount || 0)">
                        </LayoutDetailItem>
                    </LayoutDetailGroup>

                </LayoutCellItem>

                <LayoutCellItem title="订单支付信息" v-if="$vFN.Utils.isEmpty(orderData.cancelReason)">

                    <LayoutDetailGroup :gutter="20">
                        <LayoutDetailItem v-if="orderData.orderFreight" :span="8" label="运费"
                            :value="$vFN.Tools.toMoneyCount(orderData.orderFreight.collectAmount || 0)">
                        </LayoutDetailItem>
                        <LayoutDetailItem :span="8" label="税费" :value="$vFN.Tools.toMoneyCount(orderData.taxAmount || 0)">
                        </LayoutDetailItem>
                        <LayoutDetailItem v-if="orderData.orderType == 1" :span="8" label="商品总额"
                            :value="$vFN.Tools.toMoneyCount(orderData.productAmount || 0)">
                        </LayoutDetailItem>
                        <LayoutDetailItem :span="8" label="应收金额" :value="$vFN.Tools.toMoneyCount(orderData.collectAmount || 0)">
                        </LayoutDetailItem>
                        <LayoutDetailItem :span="8" label="实收金额" :value="$vFN.Tools.toMoneyCount(orderData.payAmount || 0)">
                        </LayoutDetailItem>
                        <LayoutDetailItem v-if="orderData.orderPayment" :span="8" label="支付方式"
                            :value="payManner(orderData.orderPayment) || '无'">
                        </LayoutDetailItem>


                    </LayoutDetailGroup>

                </LayoutCellItem>
                <!-- <LayoutCellItem title="收货信息" v-if="orderData.orderReceiveAddress">


                    <LayoutDetailGroup :gutter="20">
                        <LayoutDetailItem :span="8" v-if="orderData.orderReceiveAddress && orderData.orderType == 1"
                            label="买家姓名" :value="orderData.orderReceiveAddress.name || '无'">
                        </LayoutDetailItem>

                        <LayoutDetailItem :span="8" v-if="orderData.orderReceiveAddress && orderData.orderType == 1"
                            label="买家电话" :value="orderData.orderReceiveAddress.mobile || '无'">
                        </LayoutDetailItem>

                        <LayoutDetailItem :span="24" v-if="orderData.orderReceiveAddress && orderData.orderType==1"
                            label="收货信息" :value="addressName(orderData.orderReceiveAddress)">
                        </LayoutDetailItem>
                    </LayoutDetailGroup>

                </LayoutCellItem> -->
                <LayoutCellItem title="物流信息" v-if="orderData.orderDelivery">


                    <LayoutDetailGroup :gutter="20">
                        <LayoutDetailItem :span="8" label="物流单号" :value="orderData.orderDelivery.deliveryNo || '无'">
                        </LayoutDetailItem>
                        <LayoutDetailItem :span="8" label="快递公司" :value="orderData.orderDelivery.companyName || '无'">
                        </LayoutDetailItem>
                    </LayoutDetailGroup>

                </LayoutCellItem>
                <!-- <LayoutCellItem title="商品信息" v-if="orderData.orderType == 1">
                    <el-table :data="orderData.orderItemLst" style="width: 100%" border show-summary
                        :summary-method="getSummaries">
                        <el-table-column label="商品">
                            <template slot-scope="scope">
                                <div class="commodity">
                                    <div class="commodity_img">
                                     <img :src="scope.row.albumUrl"> 
                                        <imageBox :src="scope.row.albumUrl"></imageBox>
                                    </div>
                                    <div class="commodity_Introduction">
                                        <div class="commodity_Introduction_name">
                                            {{ scope.row.productName }}
                                        </div>
                                        <div class="commodity_Introduction_specification">
                                            规格：{{ scope.row.spData == null ? "无" :
                                            JSON.parse(scope.row.spData).textString }}
                                        </div>
                                    </div>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="activityPrice" label="单价 (元)" width="150"></el-table-column>
                        <el-table-column prop="buyNum" label="数量" width="150"></el-table-column>
                        <el-table-column label="售后状态" width="150">
                            <template slot-scope="scope">
                                {{refundStatus(scope.row.rightStatus)}}
                            </template>
                        </el-table-column>
                        <el-table-column prop="totalAmount" label="金额" width="150"></el-table-column>

                    </el-table>

                </LayoutCellItem> -->


                <LayoutCellItem title="发票信息" v-if="orderData.orderInvoice">


                    <LayoutDetailGroup :gutter="20">
                        <LayoutDetailItem :span="8" label="发票抬头类型"
                            :value="orderData.orderInvoice.titleType ===1? '个人' : '单位' ">
                        </LayoutDetailItem>
                        <LayoutDetailItem :span="8" label="发票类型"
                            :value="invoiceType2Text(orderData.orderInvoice.invoiceType)">
                        </LayoutDetailItem>
                        <LayoutDetailItem :span="8" label="收货人手机" :value="orderData.orderInvoice.receiverMobile || '无'">
                        </LayoutDetailItem>
                        <LayoutDetailItem :span="8" label="收货人邮箱" :value="orderData.orderInvoice.receiverEmail || '无'">
                        </LayoutDetailItem>
                        <LayoutDetailItem v-if="orderData.orderInvoice.titleType===2" :span="8" label="税号"
                            :value="orderData.orderInvoice.taxNumber || '无'">
                        </LayoutDetailItem>
                        <LayoutDetailItem v-if="orderData.orderInvoice.titleType===2" :span="8" label="单位名称"
                            :value="orderData.orderInvoice.titleName || '无'">
                        </LayoutDetailItem>
                        <LayoutDetailItem v-if="orderData.orderInvoice.titleType===2" :span="8" label="单位地址"
                            :value="orderData.orderInvoice.companyAddress || '无'">
                        </LayoutDetailItem>
                        <LayoutDetailItem v-if="orderData.orderInvoice.titleType===2" :span="8" label="单位电话"
                            :value="orderData.orderInvoice.companyTel || '无'">
                        </LayoutDetailItem>
                        <LayoutDetailItem v-if="orderData.orderInvoice.titleType===2" :span="8" label="银行名称"
                            :value="orderData.orderInvoice.bankName || '无'">
                        </LayoutDetailItem>
                        <LayoutDetailItem v-if="orderData.orderInvoice.titleType===2" :span="8" label="银行账号"
                            :value="orderData.orderInvoice.bankAccount || '无'">
                        </LayoutDetailItem>
                        <LayoutDetailItem :span="8" label="应收税费" :value="$vFN.Tools.toMoneyCount(orderData.orderInvoice.collectAmount || 0)">
                        </LayoutDetailItem>
                        <LayoutDetailItem :span="8" label="税费优惠" :value="$vFN.Tools.toMoneyCount(orderData.orderInvoice.promotionAmount || 0)">
                        </LayoutDetailItem>
                        <LayoutDetailItem :span="8" label="实收税费" :value="$vFN.Tools.toMoneyCount(orderData.orderInvoice.payAmount || 0)">
                        </LayoutDetailItem>


                    </LayoutDetailGroup>

                </LayoutCellItem>

                <LayoutCellItem title="备注">

                    <LayoutDetailGroup :gutter="20">
                        <LayoutDetailItem :span="24" label="客户备注" :value="orderData.customerNote || '无'">
                        </LayoutDetailItem>
                        <LayoutDetailItem v-if="orderData.orderNote" :span="24" label="商家备注"
                            :value="orderData.orderNote.storeNote || '无'">
                        </LayoutDetailItem>
                    </LayoutDetailGroup>
                </LayoutCellItem>
            </LayoutCell>
        </template>
        <template slot="footer">
            <el-button @click="noteOrder(orderData)" >备注</el-button>
        </template>
    </LayoutEditFormBox>
</el-dialog>